<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登陆注册</title>
	<link rel="stylesheet" href="__CSS__/loginRegister.css" />
	</head>
	<body>
		<div class="l_main">
			<div class="logo">
				<a href="#">
					<img src="__IMG__/58.png" alt="" />
				</a>
			</div>
			<div class="l_content">
				<div class="l_content_l">
					<div class="l_content_lin">
						<div class="space5"></div>
						<a href="#" class="a_login">登陆</a> <a href="{:U('User/register')}" class="a_reg">注册</a>
						<div class="space2"></div>
						<form action="" method="post" >
							<input type="text" id='username' placeholder="请输入账号"/>
							<div class="space2"></div>
							<input type="password" id='password' placeholder="密码"/>
							<div class="space3"></div>
							<a href="javascript:;" id='login' class="l_submit">立即登陆</a>
							<div class="space1"></div>
							<input type="checkbox" name='remember' id='remember' /><p>记住我 <span><a href="{:U('User/forget')}" class="l_wang">忘记密码?</a></span></p>
							<input type="hidden" name='refer' value="{:get_redirect_url()}">
						</form>
						<div class="space1"></div>
						<div class="space2"></div>
						<div class="dashed_bar" ></div>
						<div class="space2"></div>
						<div class="lin_p">
							<p class="lin_p">使用合作账号</p>
						</div>
						<div class="space2"></div>
						<div class="qqwei">
							<a href=""><img src="__IMG__/59.png" alt="" /></a>
							<a href=""><img src="__IMG__/60.png" alt="" /></a>
							<a href=""><img src="__IMG__/61.png" alt="" /></a>
						</div>
					</div>
				</div>
				<div class="l_content_m">
				</div>
				<div class="l_content_r">
					<div class="space5"></div>
					<p class="p_r1">手机扫码，安全登陆</p>
					<div class="space2"></div>
					<img src="__IMG__/62.png" alt="" />
					<div class="space1"></div>
					<div class="l_content_rfoot">
						<div class="space_ll"></div>
						<p>打开 <a href="#">手机版123在线教育</a></p>
						<span>扫一扫登陆</span>
					</div>
				</div>
			</div>
		</div>
		<include file='Public/commonfooter' />
		<script type="text/javascript">
			$('#login').on('click' , function(){
				var mobile = $('#username').val();
				var password = $('#password').val();
				var preg1 = /^1[3|4|5|6|7|8|9]\d{9}$/i;
				if( !preg1.test(mobile)){
					layer.msg('用户名格式不正确');return;
				}
				var preg2 = /^[0-9a-zA-Z_,\.\*\!&]{6,15}$/;
				if(!preg2.test(password)){
					layer.msg('密码长度为6-16位，只能含有.*!&等特殊字符');return;
				}
				var remember = $('#remember');
				if(remember.is(':checked')){
					var rememberme = 1 ;
				}else{
					rememberme = 0 ; 
				}
				var url = '{:U("User/login")}';
				$.post(url , {username:mobile , password:password , rememberme : rememberme} , function(data){
					if(data.status){window.location.href=data.url}else{
						msg(data.info);
					}
				},'json');
			});
		</script>
	</body>
</html>
